package com.google.code.sms.ajax;

import java.util.List;

import com.google.code.sms.domain.Playlist;

/**
 * The playlist of a player.
 *
 * @author Sindre Mehus
 */
public class PlaylistInfo {

    private final Playlist playlist;
    private final List<Entry> entries;

    public PlaylistInfo(Playlist playlist, List<Entry> entries) {
        this.playlist = playlist;
        this.entries = entries;
    }

    public Playlist getPlaylist() {
        return playlist;
    }

    public List<Entry> getEntries() {
        return entries;
    }

    public static class Entry {

        private final int id;
        private final String title;
        private final String artist;
        private final String album;
        private final String durationAsString;

        public Entry(int id, String title, String artist, String album, String durationAsString) {
            this.id = id;
            this.title = title;
            this.artist = artist;
            this.album = album;
            this.durationAsString = durationAsString;
        }

        public int getId() {
            return id;
        }

        public String getTitle() {
            return title;
        }

        public String getArtist() {
            return artist;
        }

        public String getAlbum() {
            return album;
        }

        public String getDurationAsString() {
            return durationAsString;
        }
    }
}
